<!-- added to the navigation controls for the collection. enclose items in list elements. @collection is defined here but @challenge may not be.  -->
<% collection ||= @collection %>
<% if collection.challenge.signup_open %>
  <% if logged_in? %>
    <% if (@challenge_signup = ChallengeSignup.in_collection(collection).by_user(current_user).first) %>
      <li><%= link_to ts("Edit Signup"), edit_collection_signup_path(collection, @challenge_signup) %></li>
      <li>
        <%= link_to ts("Cancel Signup"), 
          collection_signup_path(collection, @challenge_signup), 
          :confirm => ts("Are you sure you want to cancel your signup? All signup information will be lost."), 
          :method => :delete %>
      </li>
    <% elsif (!collection.moderated? || collection.user_is_posting_participant?(current_user)) %>
      <li><%= link_to ts("Sign Up"), new_collection_signup_path(collection) %></li>
    <% end %>
  <% end %>
<% end %>